<%= head_template(config, "API Reference", false) %>
<%= sidebar_template(config, :extra) %>

<div id="top-content">
  <div class="heading-with-actions top-heading">
    <h1>API Reference <small class="app-vsn"><%= config.project %> v#<%= config.version %></small></h1>
    <%= if config.source_url do %>
      <a href="<%= config.source_url %>" title="View Source" class="icon-action" rel="help">
        <i class="ri-code-s-slash-line" aria-hidden="true"></i>
        <span class="sr-only">View Source</span>
      </a>
    <% end %>
  </div>

  <%= if nodes_map.modules != [] do %>
    <section class="details-list">
      <h2 id="modules" class="section-heading">Modules</h2>
      <div class="summary">
        <%= for module_node <- Enum.sort_by(nodes_map.modules, & &1.id) do
          api_reference_entry_template(module_node)
        end %>
      </div>
    </section>
  <% end %>

  <%= if nodes_map.tasks != [] do %>
    <section class="details-list">
      <h2 id="tasks" class="section-heading">Mix Tasks</h2>
      <div class="summary">
        <%= for task_node <- nodes_map.tasks do
          api_reference_entry_template(task_node)
        end %>
      </div>
    </section>
  <% end %>
</div>

<%= footer_template(config, nil) %>